/****************************************************************************
 *
 * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/stdio/perror.c,v $
 * $Date: 2005/11/16 03:15:42 $
 * $Revision: 1.4 $
 * $State: Exp $
 * $Author: joty $
 *
 ***************************************************************************/

#include <errno.h>
#include <stdio.h>
#include <string.h>

__STDIOLIB__

void
perror (const char *string)
{
  const char *error = strerror (errno);

  if (string)
    fprintf (stderr, "%s: %s\n", string, error);
  else
    fprintf (stderr, "%s\n", error);
}
